-- GENERATED SPELL FOR [Iron Mender] --


function spell0_34198(pUnit, Event) --@Electro Shock,n/a--
pUnit:FullCastSpellOnTarget(64918,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_34198', 3500, 1)
end

function spell1_34198(pUnit, Event) --@Electro Shock,n/a--
pUnit:FullCastSpellOnTarget(64971,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_34198', 3500, 1)
end

function spell2_34198(pUnit, Event) --@Fuse Lightning,n/a--
pUnit:FullCastSpellOnTarget(64903,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_34198', 10000, 1)
end

function spell3_34198(pUnit, Event) --@Fuse Lightning,n/a--
pUnit:FullCastSpellOnTarget(64970,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_34198', 10000, 1)
end

function spell4_34198(pUnit, Event) --@Fuse Metal,Heal--
pUnit:FullCastSpellOnTarget(64897,pUnit)
pUnit:RegisterEvent('Sorts_34198', 5000, 1)
end

function spell5_34198(pUnit, Event) --@Fuse Metal,Heal--
pUnit:FullCastSpellOnTarget(64968,pUnit)
pUnit:RegisterEvent('Sorts_34198', 5000, 1)
end

function Sorts_34198(pUnit, Event)
local choix_sorts_34198 = math.random(0, 5)
if choix_sorts_34198 == 0 then
pUnit:RegisterEvent('spell0_34198', 1, 1)
end
if choix_sorts_34198 == 1 then
pUnit:RegisterEvent('spell1_34198', 1, 1)
end
if choix_sorts_34198 == 2 then
pUnit:RegisterEvent('spell2_34198', 1, 1)
end
if choix_sorts_34198 == 3 then
pUnit:RegisterEvent('spell3_34198', 1, 1)
end
if choix_sorts_34198 == 4 then
pUnit:RegisterEvent('spell4_34198', 1, 1)
end
if choix_sorts_34198 == 5 then
pUnit:RegisterEvent('spell5_34198', 1, 1)
end
end

function mob34198_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_34198', math.random(1500, 3000), 1)
end

function mob34198_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob34198_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob34198_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(34198, 1, 'mob34198_Action')
RegisterUnitEvent(34198, 2, 'mob34198_Leave')
RegisterUnitEvent(34198, 3, 'mob34198_Kill')
RegisterUnitEvent(34198, 4, 'mob34198_Die')
